package com.zys.el.user.controller;

import com.zys.el.core.controller.BaseController;
import com.zys.el.core.po.ResponseBean;
import com.zys.el.user.po.TargetUser;
import com.zys.el.user.service.ITargetUserService;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping(value = "/target-user")
public class TargetUserController extends BaseController<ITargetUserService, TargetUser> {

    @GetMapping(value = "/get-target/{id}")
    public ResponseBean GetTargetId(@PathVariable("id") Long userId) {
        ResponseBean rm = new ResponseBean();
        TargetUser targetUser = service.selectTargetByUserId(userId);
        rm.setModel(targetUser);
        return rm;
    }
}
